BlindEye
|
Initiate
|
|
|
Reged: 04/09/04
|
Posts: 92
|
Loc: Canada
|
|
|
I would like to implement a script that will cause the doors of a Traders store to lock when the player steals a specific item; I presume the script would have two parts, one for the item, and one for the door. Is this possible? Would anyone know where I could get such a script? or is there a way to edit a script in TESCS to comply with this function?
-------------------- But I, being poor, have only my dreams;
I have spread my dreams under your feet;
Tread softly because you tread on my dreams.
W. B. Yates
Post Extras:
|
|
|
OK, well you need firstly a unique item or items. You also need all the doors from the area to have unique IDs.
The objects in question need to have a script on them, perhpas like his untested one:
Code:
Begin PB_Lock_In
if ( MenuMode )
Return
endif
if ( OnActivate ); try with OnPCAdd instead if you like
if ( GetPCCell "Name of cell" == 1 ); prevents this from happening every time the object is activated later in the game
"door 1 "->Lock 50
"door 2"->Lock 50
"door 3"->lock 50
Activate
else
Activate
endif
endif
end
Edited by Patrograd2 (08/12/04 08:58 AM)
Post Extras:
|
|
|
I'd think you could survive with one script in the manner of (not exact, don't copy):
Begin dontsteal script short doOnce
if (doOnce == 0 ) if (OnActivate == 1) Messagebox "Uh oh! Looks like some omni-potent entity knows that you've stolen his spoon!" "Unique_Door_ID"->Setlock 100 ;"Demon_guard_of_doom_spoon"->Enable set doOnce to 1 endif endif End
----------------------------- No?
-------------------- Quoting my favorite madman:
" All these forests shall be lumber for my throne..."
Quoting my favorite barbarian:
"I am the bigger and the stronger, than all these girly monsters"
Some pictures of my latest mod/mods:
http://www.cuneo.us/tesmw/images/Olaf/
Post Extras:
|
BlindEye
|
Initiate
|
|
|
Reged: 04/09/04
|
Posts: 92
|
Loc: Canada
|
|
|
Thank you.
I'm building a Mod to flesh out Traders stores, but I'd like to prevent Players stealing from Traders/killing the Trader.
Traders will have added security from bodyguards who are extremely tough and near impossible to kill. However, in the advent that a player is extremely fast, he or she might be able to snatch valuables from the shelves and run! I'd like to stop that from happening... with the script.
I could always use the nopickup script, but I'd like the player to think they have got away with it... until they try the door that is.
Note: The valuables on show are just for eye candy and to temp the player to steal, they are essentially... a trap!
Thank you for your help.
-------------------- But I, being poor, have only my dreams;
I have spread my dreams under your feet;
Tread softly because you tread on my dreams.
W. B. Yates
Post Extras:
|
BlindEye
|
Initiate
|
|
|
Reged: 04/09/04
|
Posts: 92
|
Loc: Canada
|
|
|
Thank you also Olaf_Merchant : )
I will study and test both scripts.
-------------------- But I, being poor, have only my dreams;
I have spread my dreams under your feet;
Tread softly because you tread on my dreams.
W. B. Yates
Post Extras:
|
|
|
Quote:
OK, well you need firstly a unique item or items. You also need all the doors from the area to have unique IDs.
The objects in question need to have a script on them, perhpas like his untested one:
Code:
Begin PB_Lock_In
if ( MenuMode ) Return endif
if ( OnActivate ); try with OnPCAdd instead if you like if ( GetPCCell "Name of cell" == 1 ); prevents this from happening every time the object is activated later in the game "door 1 "->Lock 50 "door 2"->Lock 50 "door 3"->lock 50 Activate else Activate endif endif
end
This one is a dangerous script since it has multiple activates in the same if (OnActivate == 1 ) loop. See my thread "A problem with a global variable". I had extra statements that went with the second activate and it took me all night to figure out that it was the activate command that was causing all the problems.
Post Extras:
|
BlindEye
|
Initiate
|
|
|
Reged: 04/09/04
|
Posts: 92
|
Loc: Canada
|
|
|
I'll go to you're thread militech.
Thank you : )
-------------------- But I, being poor, have only my dreams;
I have spread my dreams under your feet;
Tread softly because you tread on my dreams.
W. B. Yates
Post Extras:
|